package com.easylive.entity.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: yudaxian
 * @DateTime: 2024/12/24 14:09
 **/
@Getter
@AllArgsConstructor
public enum MessageReadTypeEnum {
    UNREAD(0, "未读"),
    READ(1, "已读"),
    ;

    private Integer type;

    private String desc;

    public static MessageReadTypeEnum getByType(Integer type) {
        for (MessageReadTypeEnum messageReadTypeEnum : MessageReadTypeEnum.values()) {
            if (messageReadTypeEnum.getType().equals(type)) {
                return messageReadTypeEnum;
            }
        }
        return null;
    }
}
